<h1>Danh sách chuyên mục</h1>
    <div class="toppage">
        <span class="btnadd">
        <a href="<?php echo action_link('update_cat'); ?>">Thêm mới</a>
        </span>
    </div>
    <div class="tableout">
    
    	<form method="post" action="<?php echo action_link('do_action'); ?>" id="products_type_form">

		<div class="title1">
        	<div class="column" style="width: 2%;"><input class="check_all" onclick="check_all(this)" type="checkbox"></div>            
            <div class="column" style="width: 10%;">#</div>
            <div class="column" style="width: 50%;">Tên chuyên mục</div>
            <div class="column" style="width: 20%;">Loại</div>
            <div class="column" style="width: 8%;">Kích hoạt</div>
        </div>
        
        <?php if(count($cats) > 0){ ?>
        <?php foreach($cats as $i => $pro): ?>
        <div class="linecate2" id="linecate2">
        	<div class="column" style="width: 2%;"><input name="id[]" value="<?php echo $pro->id; ?>" type="checkbox" /></div>
            <div class="column" style="width: 10%;">
            	<a href="javascript:;" class="art"><?php echo ($i+1);?></a><br>
            </div>            
            <div id="row_<?php echo $pro->id;?>">            
	            <div class="column" style="width: 50%;" onmouseover="Hovercat('<?php echo $pro->id; ?>')" onmouseout="Outcat('<?php echo $pro->id; ?>')">
	            	<a href="javascript:;" class="art"><?php echo $pro->name; ?></a>
	                <div class="action" id="neocat-<?php echo $pro->id; ?>">
	                    <img src="<?php echo img_link('edit.gif', 'admin'); ?>"><a href="<?php echo action_link('update_cat/'.$pro->id); ?>">Sửa</a><img src="<?php echo img_link('delete.gif', 'admin'); ?>"><a href="javascript:void(0)" onclick="product_type_delete('<?php echo $pro->id; ?>')"><font color="#be0000">Xóa</font></a>
	                </div>
	            </div>   
	            <div class="column" style="width: 20%;">
		            <?php if($pro->type == 0): ?>
					<a href="#">Tin</a>
		            <?php else: ?>
					<a href="#">Giới thiệu</a>
		            <?php endif; ?>
	            </div>         
            	<div class="column" style="width: 8%;">
		            <?php if($pro->active == 0): ?>
					<a href="javascript:void(0);" onclick="product_type_status('<?php echo $pro->id;?>', 'yes')"><img src="<?php echo img_link('pending.png', 'admin'); ?>" class="icon png" title="Kích hoạt" alt="Kích hoạt"></a>
		            <?php else: ?>
					<a href="javascript:void(0);" onclick="product_type_status('<?php echo $pro->id;?>', 'no')"><img src="<?php echo img_link('active.png', 'admin'); ?>" class="icon png" title="Hủy kích hoạt" alt="Hủy kích hoạt"></a>
		            <?php endif; ?>
	            </div>
            </div>
        </div>
		<?php endforeach; ?>
		<?php } ?>

        <div class="bottom1">
        	<div class="column" style="width: 2%;"><input class="check_all" onclick="check_all(this)" value="" type="checkbox"></div>
            <div class="column" style="width: 50%;">
            	<select style="width: 130px;" id="action_name" name="action">
                    <option value="">Chọn hành động</option>
                    <option value="delete">Xóa</option>
                    <option value="active">Kích hoạt</option>
                    <option value="pending">Hủy kích hoạt</option>                    
                </select>
                <input value="Apply" class="btn" type="submit">
            </div>
            <span class="right1">
            	
                <div class="pagination">
                	
                    <ul>
                    <?php //echo $pagnav; ?>
                    </ul>
                </div>
            </span>
        </div>
        
        </form>
        
    </div>